package com.learn.common.utils.result;

import lombok.Getter;
import org.joda.time.DateTime;

/**
 * @author zhaohongwei1@itcast.cn
 * 2019-10-13 14:36
 */
@Getter
public class CommonResult<T> {
    private String timestamp;
    private Integer state;
    private String msg;
    private T data;

    public CommonResult(String msg,Integer state,T data) {
        this.state = state;
        this.msg = msg;
        this.data = data;
        timestamp = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
    }
}